package com.zz.load.util;
import java.io.OutputStream;
import java.io.PrintWriter;

public class MyPrintWriter {
    private PrintWriter printWriter;
    String respHeader = "HTTP/1.1 200 OK\r\n" +
            "Content-Type: text/html;charset=utf-8\r\n\r\n";

    public MyPrintWriter(OutputStream outputStream){
        printWriter = new PrintWriter(outputStream);
    }

    public void write(Object value){
        printWriter.println(respHeader + value.toString());
        printWriter.flush();
//        printWriter.close();

    }

}
